﻿Imports extranet.BE
Imports extranet.DA

Public Class BCCategoriaVideo

  Public Shared Sub Cadastrar(ByRef objBECategoriaVideo As BECategoriaVideo)
    Dim objDACategoriaVideo As New DACategoriaVideo
    objDACategoriaVideo.Cadastra(objBECategoriaVideo)
  End Sub

  Public Shared Sub Atualizar(ByVal objBECategoriaVideo As BECategoriaVideo)
    Dim objDACategoriaVideo As New DACategoriaVideo
    objDACategoriaVideo.Atualiza(objBECategoriaVideo)
  End Sub

  Public Shared Sub Excluir(ByVal objBECategoriaVideo As BECategoriaVideo)
    Dim objDACategoriaVideo As New DACategoriaVideo
    objDACategoriaVideo.Exclui(objBECategoriaVideo)
  End Sub

  Public Shared Function Selecionar(ByVal intIdCategoriaVideo As Integer) As List(Of BECategoriaVideo)
    Dim objDACategoriaVideo As New DACategoriaVideo
    Return objDACategoriaVideo.SelecionaCategoriasVideos(New BECategoriaVideo(intIdCategoriaVideo, ""))
  End Function

  Public Shared Function Selecionar(ByVal strCategoria As String, _
                                    ByVal sortExpression As String, ByVal sortDirection As String) As List(Of BECategoriaVideo)
    Dim objDACategoriaVideo As New DACategoriaVideo
    objDACategoriaVideo.objQuery.Sort = New BESort(sortExpression, sortDirection)
    Return objDACategoriaVideo.SelecionaCategoriasVideos(New BECategoriaVideo(strCategoria))
  End Function

End Class
